package com.beimin.evedata.model.sta;

// Generated 11-feb-2008 1:47:31 by Hibernate Tools 3.2.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.beimin.evedata.model.inv.InvType;
import com.beimin.evedata.model.map.Location;
import com.beimin.evedata.model.map.MapConstellation;
import com.beimin.evedata.model.map.MapRegion;
import com.beimin.evedata.model.map.MapSolarSystem;

@Entity
@Table(name = "stastations")
public class StaStation implements java.io.Serializable, Location, Comparable<Location> {
	@Id
	@Column(name = "stationID", unique = true, nullable = false)
	private int stationId;
	@Column(name = "security")
	private Integer security;
	@Column(name = "dockingCostPerVolume", precision = 22, scale = 0)
	private Double dockingCostPerVolume;
	@Column(name = "maxShipVolumeDockable", precision = 22, scale = 0)
	private Double maxShipVolumeDockable;
	@Column(name = "officeRentalCost")
	private Integer officeRentalCost;
	@Column(name = "operationID")
	private Integer operationId;
	@ManyToOne
	@JoinColumn(name = "stationTypeID")
	private InvType type;
	@Column(name = "corporationID")
	private Integer corporationId;
	@ManyToOne
	@JoinColumn(name = "solarSystemID")
	private MapSolarSystem system;
	@ManyToOne
	@JoinColumn(name = "constellationID")
	private MapConstellation constellation;
	@ManyToOne
	@JoinColumn(name = "regionID")
	private MapRegion region;
	@Column(name = "stationName", length = 100)
	private String stationName;
	@Column(name = "x", precision = 22, scale = 0)
	private Double x;
	@Column(name = "y", precision = 22, scale = 0)
	private Double y;
	@Column(name = "z", precision = 22, scale = 0)
	private Double z;
	@Column(name = "reprocessingEfficiency", precision = 22, scale = 0)
	private Double reprocessingEfficiency;
	@Column(name = "reprocessingStationsTake", precision = 22, scale = 0)
	private Double reprocessingStationsTake;
	@Column(name = "reprocessingHangarFlag")
	private Integer reprocessingHangarFlag;

	public StaStation() {
	}

	public StaStation(int stationId) {
		this.stationId = stationId;
	}

	public int getStationId() {
		return this.stationId;
	}

	public void setStationId(int stationId) {
		this.stationId = stationId;
	}

	public Integer getSecurity() {
		return this.security;
	}

	public void setSecurity(Integer security) {
		this.security = security;
	}

	public Double getDockingCostPerVolume() {
		return this.dockingCostPerVolume;
	}

	public void setDockingCostPerVolume(Double dockingCostPerVolume) {
		this.dockingCostPerVolume = dockingCostPerVolume;
	}

	public Double getMaxShipVolumeDockable() {
		return this.maxShipVolumeDockable;
	}

	public void setMaxShipVolumeDockable(Double maxShipVolumeDockable) {
		this.maxShipVolumeDockable = maxShipVolumeDockable;
	}

	public Integer getOfficeRentalCost() {
		return this.officeRentalCost;
	}

	public void setOfficeRentalCost(Integer officeRentalCost) {
		this.officeRentalCost = officeRentalCost;
	}

	public Integer getOperationId() {
		return this.operationId;
	}

	public void setOperationId(Integer operationId) {
		this.operationId = operationId;
	}

	public InvType getType() {
		return type;
	}

	public void setType(InvType type) {
		this.type = type;
	}

	public Integer getCorporationId() {
		return this.corporationId;
	}

	public void setCorporationId(Integer corporationId) {
		this.corporationId = corporationId;
	}

	public MapSolarSystem getSystem() {
		return system;
	}

	public void setSystem(MapSolarSystem system) {
		this.system = system;
	}

	public MapConstellation getConstellation() {
		return constellation;
	}

	public void setConstellation(MapConstellation constellation) {
		this.constellation = constellation;
	}

	public MapRegion getRegion() {
		return region;
	}

	public void setRegion(MapRegion region) {
		this.region = region;
	}

	public String getStationName() {
		return this.stationName;
	}

	public void setStationName(String stationName) {
		this.stationName = stationName;
	}

	public Double getX() {
		return this.x;
	}

	public void setX(Double x) {
		this.x = x;
	}

	public Double getY() {
		return this.y;
	}

	public void setY(Double y) {
		this.y = y;
	}

	public Double getZ() {
		return this.z;
	}

	public void setZ(Double z) {
		this.z = z;
	}

	public Double getReprocessingEfficiency() {
		return this.reprocessingEfficiency;
	}

	public void setReprocessingEfficiency(Double reprocessingEfficiency) {
		this.reprocessingEfficiency = reprocessingEfficiency;
	}

	public Double getReprocessingStationsTake() {
		return this.reprocessingStationsTake;
	}

	public void setReprocessingStationsTake(Double reprocessingStationsTake) {
		this.reprocessingStationsTake = reprocessingStationsTake;
	}

	public Integer getReprocessingHangarFlag() {
		return this.reprocessingHangarFlag;
	}

	public void setReprocessingHangarFlag(Integer reprocessingHangarFlag) {
		this.reprocessingHangarFlag = reprocessingHangarFlag;
	}

	@Override
	public String getName() {
		return stationName;
	}

	@Override
	public String getLocationType() {
		return Location.STA_STATION;
	}
	
	@Override
	public int compareTo(Location o) {
		return getName().compareTo(o.getName());
	}

	@Override
	public int getId() {
		return stationId;
	}
}